//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#ifndef __BUFCACHE_H_
#define __BUFCACHE_H_

_ELASTOS_NAMESPACE_USING

struct buf;
class fatfs_sharedata;

class BufCache
{
public:
    struct buf* Get(UInt32 nsec);
    void Put(struct buf*);
    BufCache(fatfs_sharedata* pSharedata);
    ~BufCache();
    UInt32 AddRef(void);
    UInt32 Release(void);
    UInt32 stob(UInt32 nsec);

private:
    struct buf* m_freeList;
    UInt32 m_nRef;
    fatfs_sharedata* p_Sharedata;
};
#endif /* __BUFCACHE_H_ */
